package com.zelin.controller;

import com.zelin.pojo.Classes;
import com.zelin.pojo.R;
import com.zelin.service.ClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ------------------------------
 * 功能：
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/9/15-14:36
 * ------------------------------
 */
@RestController
@RequestMapping("classes")
public class ClassesController {
    @Autowired
    private ClassesService classesService;
    //1. 查询所有班级
    @GetMapping("findAll")
    public R findAll(){
        List<Classes> classesList = classesService.findAll();
        return R.ok().data("classes",classesList);
    }
}
